gsk: Reuse VAOs with identical buffers
authorEmmanuele Bassi <ebassi@gnome.org>
Tue, 9 Aug 2016 10:24:05 +0000 (11:24 +0100)
committerEmmanuele Bassi <ebassi@gnome.org>
Tue, 18 Oct 2016 10:49:13 +0000 (11:49 +0100)
commit0812d691b354415d9a82d05b3d83bc62ed0bc68b
tree04eb660efa4074cf5e1547ffae00bb82ee745c52
parent56c93a7661e46ed542e341757a141c9f83c6204c
gsk: Reuse VAOs with identical buffers

Just like we reuse texture ids with the same size we can, at the expense
of a little memory, reuse vertex buffers if they reference the same
attributes and contain the same data.

Each VAO is marked as free at the end of the frame, and if it's not
reused in the following frame, it gets dropped.
gsk/gskgldriver.c
gsk/gskgldriverprivate.h
gsk/gskglrenderer.c